<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>风险预警认领</title>
		<script src="../../js/header.js"></script>
	</head>
	<body>
		<div v-cloak id="app">
			<div style="margin-top: 10px;">
				<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
					<el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
						<el-row>
							<el-col :span="10">
								<el-form-item label="预警领域:" prop="" label-width="130px">
									<el-select v-model="selectForm.fxyjDomainId" placeholder="请选择" :disabled="selectFormDisabled">
										<el-option label="综合监管" value="10"></el-option>
										<el-option label="自然资源" value="20"></el-option>
										<el-option label="生态环境" value="30"></el-option>
										<el-option label="交通运输" value="40"></el-option>
										<el-option label="农业农村" value="50"></el-option>
										<el-option label="文化旅游" value="60"></el-option>
										<el-option label="卫生健康" value="70"></el-option>
										<el-option label="市场监管" value="80"></el-option>
										<el-option label="食品监管" value="90"></el-option>
										<el-option label="药品监管" value="0"></el-option>
										<el-option label="安全生产" value="1"></el-option>
										<el-option label="金融监管" value="2"></el-option>
										<el-option label="网信安全" value="3"></el-option>
										<el-option label="社会保障" value="4"></el-option>
										<el-option label="税务税收" value="5"></el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col span="10">
								<el-form-item label="风险预警标题:" prop="" label-width="130px">
									<el-input v-model="selectForm.fxyjTitle" placeholder="" :disabled="selectFormDisabled"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col span="10">
								<el-form-item label="风险级别:" prop="" label-width="130px">
									<el-select v-model="selectForm.fxyjLevel" placeholder="请选择" :disabled="selectFormDisabled">
										<el-option label="高风险" value="0"></el-option>
										<el-option label="中高风险" value="1"></el-option>
										<el-option label="中风险" value="2"></el-option>
										<el-option label="低风险" value="3"></el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="监管对象名称:" prop="" label-width="130px">
									<el-input v-model="selectForm.fxyjObjectName" placeholder="" :disabled="selectFormDisabled"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="10">
								<el-form-item label="系统传输时间:" prop="" label-width="130px">
									<el-date-picker
											v-model="selectForm.startTime1"
											type="date"
											value-format="yyyy-MM-dd"
											placeholder="开始时间"
											style="width: 137px;"
											:editable="false"
											:disabled="selectFormDisabled">
									</el-date-picker>
									<span style="color: rgb(192, 204, 218);text-align: center;">—</span>
									<el-date-picker
											v-model="selectForm.endTime1"
											type="date"
											value-format="yyyy-MM-dd"
											placeholder="结束时间"
											style="width: 137px;"
											:editable="false"
											:disabled="selectFormDisabled">
									</el-date-picker>
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="预警生成时间:" prop="" label-width="130px">
									<el-date-picker
											v-model="selectForm.startTime"
											type="date"
											value-format="yyyy-MM-dd"
											placeholder="开始时间"
											style="width: 137px;"
											:editable="false"
											:disabled="selectFormDisabled">
									</el-date-picker>
									<span style="color: rgb(192, 204, 218);text-align: center;">—</span>
									<el-date-picker
											v-model="selectForm.endTime"
											type="date"
											value-format="yyyy-MM-dd"
											placeholder="结束时间"
											style="width: 137px;"
											:editable="false"
											:disabled="selectFormDisabled">
									</el-date-picker>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row style="margin-bottom: 30px;">
							<div style="float: right;">
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
								<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="appovalEx()">导出</el-button>
							</div>
						</el-row>
					</el-form>
				</div>
				
				<!--展示列表-->
				<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
					<el-table-column type="selection" ></el-table-column>
					<el-table-column
							prop=""
							type="index"
							label="序号"
							width="50"
							align="center" >
					</el-table-column>
					<el-table-column
							prop="fxyjDomainId"
							label="预警领域"
							width="100"
							align="center">
							<template slot-scope="scope">
								<span v-if="scope.row.fxyjDomainId==10">综合监管</span>
								<span v-if="scope.row.fxyjDomainId==20">自然资源</span>
								<span v-if="scope.row.fxyjDomainId==30">生态环境</span>
								<span v-if="scope.row.fxyjDomainId==40">交通运输</span>
								<span v-if="scope.row.fxyjDomainId==50">农业农村</span>
								<span v-if="scope.row.fxyjDomainId==60">文化旅游</span>
								<span v-if="scope.row.fxyjDomainId==70">卫生健康</span>
								<span v-if="scope.row.fxyjDomainId==80">市场监管</span>
								<span v-if="scope.row.fxyjDomainId==90">食品监管</span>
								<span v-if="scope.row.fxyjDomainId==0">药品监管</span>
								<span v-if="scope.row.fxyjDomainId==1">安全生产</span>
								<span v-if="scope.row.fxyjDomainId==2">金融监管</span>
								<span v-if="scope.row.fxyjDomainId==3">网信安全</span>
								<span v-if="scope.row.fxyjDomainId==4">社会保障</span>
								<span v-if="scope.row.fxyjDomainId==5">税务税收</span>
							</template>
					</el-table-column>
					<el-table-column
							prop="fxyjTitle"
							label="预警标题"
							width="150"
							align="center">
					</el-table-column>
					<el-table-column
							prop="fxyjDesc"
							label="预警描述"
							width="200"
							align="center">
					</el-table-column>
					<el-table-column
							prop="fxyjLevel"
							label="预警级别"
							width="100"
							align="center">
							<template slot-scope="scope">
								<span v-if="scope.row.fxyjLevel==0">高风险</span>
								<span v-if="scope.row.fxyjLevel==1">中高风险</span>
								<span v-if="scope.row.fxyjLevel==2">中风险</span>
								<span v-if="scope.row.fxyjLevel==3">低风险</span>
							</template>
					</el-table-column>
					<el-table-column
							prop="fxyjTime"
							label="预警生成时间"
							width="80"
							align="center">
					</el-table-column>
					<el-table-column
							prop="fxyjTransmitTime"
							label="预警传送时间"
							width="80"
							align="center">
					</el-table-column>
					<el-table-column
							prop="fxyjObjectName"
							label="监管对象名称"
							width="160"
							align="center">
					</el-table-column>
					<!--<el-table-column
							prop="fxyjObjectName"
							label="行为编号"
							width="160"
							align="center">
					</el-table-column>-->
					<el-table-column
							prop="dealState"
							label="处置状态"
							width="100"
							align="center">
						<template slot-scope="scope">
							<span v-if="scope.row.dealState==''||scope.row.dealState==null ">待接收</span>
							<span v-if="scope.row.dealState==1">已接收</span>
							<span v-if="scope.row.dealState==2">已分发</span>
							<span v-if="scope.row.dealState==3">已反馈</span>
							<span v-if="scope.row.dealState==4">已结束</span>
						</template>
					</el-table-column>
					<el-table-column
							label="操作"
							width="300"
							align="center">
						<template slot-scope="scope">
							<el-button v-show="scope.row.getState != '1'" type="primary" size="mini" @click="claim(scope.$index,scope.row)">认领</el-button>
							<el-button size="mini" v-show="(scope.row.getState=='1'  && scope.row.dispenseState!='1')?true:false" @click="view(scope.$index,scope.row)">查看详情</el-button>
						</template>
					</el-table-column>
				</el-table>
				<div style="overflow: hidden;">
					<div class="pagination">
						<el-pagination
								@size-change="handleSizeChange"
								@current-change="handleCurrentChange"
								:current-page="currentPage"
								:page-sizes="[10, 20, 30, 40]"
								:page-size="pagesize"
								background
								layout="total, sizes,prev, pager, next"
								:total="tableTotal"
								prev-text="上一页"
								next-text="下一页">
						</el-pagination>
					</div>
				</div>

                <!--查看详情-->
                <el-dialog title="" :visible.sync="dialogViewForm" center fullscreen>
                    <div  style="margin-top: 10px;">
                        <el-form :model="riskwarningview" :rules="rules" ref="riskwarningview" label-width="150px">
                            <!--风险预警基本信息-->
                            <div>
                                <el-row>
                                    <el-col :span="10" class="tab-title">
                                        风险预警基本信息
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="风险预警唯一ID:"  prop="fxyjId" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjId"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="领域ID及名称:" prop="fxyjDomainId" label-width="150px">
                                            <el-select v-model="riskwarningview.fxyjDomainId" placeholder="请选择" :disabled="formDisabled">
                                                <el-option label="综合监管" value="10"></el-option>
                                                <el-option label="自然资源" value="20"></el-option>
                                                <el-option label="生态环境" value="30"></el-option>
                                                <el-option label="交通运输" value="40"></el-option>
                                                <el-option label="农业农村" value="50"></el-option>
                                                <el-option label="文化旅游" value="60"></el-option>
                                                <el-option label="卫生健康" value="70"></el-option>
                                                <el-option label="市场监管" value="80"></el-option>
                                                <el-option label="食品监管" value="90"></el-option>
                                                <el-option label="药品监管" value="0"></el-option>
                                                <el-option label="安全生产" value="1"></el-option>
                                                <el-option label="金融监管" value="2"></el-option>
                                                <el-option label="网信安全" value="3"></el-option>
                                                <el-option label="社会保障" value="4"></el-option>
                                                <el-option label="税务税收" value="5"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="风险线索所属模型ID:"  prop="fxyjModelId" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjModelId"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="监管对象类型:" prop="fxyjObjectType" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjObjectType"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="行政区划代码:"  prop="fxyjAreaNumber" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjAreaNumber"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="行政区划名称:" prop="fxyjAreaName" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjAreaName"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="监管对象ID:"  prop="fxyjObjectId" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjObjectId"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="监管对象名称:" prop="fxyjObjectName" label-width="150px">
                                            <el-select v-model="riskwarningview.fxyjObjectName" placeholder="请选择" :disabled="formDisabled">
                                                <el-option label="行政相对人（组织）" value="1"></el-option>
                                                <el-option label="行政相对人（个人）" value="2"></el-option>
                                                <el-option label="特种设备" value="3"></el-option>
                                                <el-option label="特定产品" value="4"></el-option>
                                                <el-option label="场地场所" value="5"></el-option>
                                                <el-option label="项目工程" value="6"></el-option>
                                                <el-option label="特定行为" value="7"></el-option>
                                                <el-option label="特定活动" value="8"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="平台名称:"  prop="fxyjPlatform" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjPlatform"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="平台网址:" prop="fxyjWeb" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjWeb"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="16">
                                        <el-form-item label="预警描述:"  prop="fxyjDesc" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjDesc"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="16">
                                        <el-form-item label="风险预警详情:" prop="fxyjProps">
                                            <el-input type="textarea" v-model="riskwarningview.fxyjProps" placeholder="" :disabled="formDisabled" style="width: 100%;"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="预警级别:"  prop="fxyjLevel" label-width="150px">
                                            <el-select  v-model="riskwarningview.fxyjLevel" placeholder="请选择" :disabled="formDisabled">
                                                <el-option label="高风险" value="0"></el-option>
                                                <el-option label="中高风险" value="1"></el-option>
                                                <el-option label="中风险" value="2"></el-option>
                                                <el-option label="低风险" value="3"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="预警时间:" prop="fxyjTime" label-width="150px">
                                            <el-date-picker
                                                    v-model="riskwarningview.fxyjTime"
                                                    type="date"
                                                    value-format="yyyy-MM-dd"
                                                    placeholder="选择时间"
                                                    style="width: 243px;"
													:editable="false"
                                                    :disabled="formDisabled">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="其他:"  prop="fxyjOthers" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjOthers"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="预警详情网址:" prop="fxyjDetailUrl" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjDetailUrl"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </div>
                            <!--接收处置信息-->
                            <div>
                                <el-row>
                                    <el-col :span="10" class="tab-title">
                                        接收处置信息
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="风险预警传送时间:"  prop="fxyjTransmitTime" label-width="150px">
                                            <el-input v-model="riskwarningview.fxyjTransmitTime"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="从应急部发送过来的时间:" prop="yjbSendTime" label-width="150px">
                                            <el-input v-model="riskwarningview.yjbSendTime"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="操作人:"  prop="operatePerson"  :rules="rules.operatePerson" label-width="150px">
                                            <el-input v-model="riskwarningview.operatePerson"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="操作人机构:" prop="operateOrg"  :rules="rules.operateOrg" label-width="150px">
                                            <el-input v-model="riskwarningview.operateOrg"  placeholder="" :disabled="formDisabled"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="处置结果:"  prop="disposeResult" :rules="rules.disposeResult" label-width="150px">
											<el-select v-model="riskwarningview.disposeResult" placeholder="请选择" :disabled="formDisabled">
												<el-option label="认领" value="0"></el-option>
												<!--<el-option label="分发" value="1"></el-option>
												<el-option label="回复" value="2"></el-option>
												<el-option label="结束" value="3"></el-option>-->
											</el-select>
										</el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="认领时间:" prop="getTime" :rules="rules.getTime" label-width="150px">
											<el-date-picker
													v-model="riskwarningview.getTime"
													type="date"
													value-format="yyyy-MM-dd"
													placeholder="选择时间"
													style="width: 280px;"
													:editable="false"
													:disabled="formDisabled">
											</el-date-picker>
										</el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="16">
                                        <el-form-item label="处置说明:" :rules="rules.disposeExplain" prop="disposeExplain">
                                            <el-input type="textarea" onKeyUp="value=value.replace(/[<>]|http:\/\//g,'')" onmouseout="value=value.replace(/[<>]|http:\/\//g,'')" v-model="riskwarningview.disposeExplain" placeholder="" :disabled="replyformDisabled" style="width: 100%;"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
								<div >
									<el-row>
										<el-col :span="22">
											<div style="float:right;">
												<el-button v-show="viewOrEdit" type="primary" size="small" style="width: 60px;height: 30px;" @click="submitForm()">提交</el-button>
												<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogViewForm = false;">取消</el-button>
											</div>
										</el-col>
									</el-row>
								</div>
                            </div>

                        </el-form>
                    </div>
                </el-dialog>

			</div>
		</div>
		<script>
			var vm = new Vue({
				el: '#app',
				data(){
					return{
						currentPage: 1,
						pagesize: 10,
						tableTotal:'',
						tableData: [],
						selectForm: {
                            fxyjDomainId:'',
                            fxyjTitle:'',
                            fxyjLevel:'',
                            fxyjObjectName:'',
                            startTime1:'',
		                    endTime1:'',
		                    startTime:'',
		                    endTime:'',
		               },
                        riskwarningview: {
						    id:'',
                            fxyjId:'',
                            fxyjDomainId:'',
                            fxyjModelId:'',
                            fxyjObjectType:'',
                            fxyjAreaNumber:'',
                            fxyjAreaName:'',
                            fxyjObjectId:'',
                            fxyjObjectName:'',
                            fxyjPlatform:'',
                            fxyjWeb:'',
                            fxyjDesc:'',
                            fxyjProps:'',
                            fxyjLevel:'',
                            fxyjTime:'',
                            fxyjOthers:'',
                            fxyjDetailUrl:'',
                            fxyjTransmitTime:'',
                            yjbSendTime:'',
                            operatePerson:'',
                            operateOrg:'',
                            disposeResult:'0',
                            getTime:'',
                            disposeExplain:''

                        },
                        dialogViewForm:false,
                        replyformDisabled:false,
                        formDisabled:false,
						viewOrEdit:false,
		               	selectFormDisabled:false,
						userInfo:'',
						rules: {
							operatePerson: [{
								required: true,
								message: '请输入操作人',
								trigger: 'blur'
							}],
							operateOrg: [{
								required: true,
								message: '请输入操作人机构',
								trigger: 'blur'
							}],
							disposeResult: [{
								required: true,
								message: '请选择处置结果',
								trigger: 'blur'
							}],
							getTime: [{
								required: true,
								message: '请输入认领时间',
								trigger: 'blur'
							}],
						}
					}
				},
                created: function() {
					this.userInfo = JSON.parse(localStorage.getItem('userInfo'));
				},
				mounted(){
		            this.getData();
		        },
		        methods: {
		        	getData() {
		                var pagesize = this.pagesize;
		                var pageno = this.currentPage;
		                axios({
		                    method: 'get',
		                    url: '/fxyj/acquier/getAllAcquier',
		                    params: {
                                pageSize: pagesize,
                                pageNo: pageno,
                                fxyjDomainId: this.selectForm.fxyjDomainId,
                                fxyjTitle: this.selectForm.fxyjTitle,
                                fxyjLevel: this.selectForm.fxyjLevel,
                                fxyjObjectName: this.selectForm.fxyjObjectName,
                                startTime1: this.selectForm.startTime1,
                                endTime1: this.selectForm.endTime1,
                                startTime: this.selectForm.startTime,
                                endTime: this.selectForm.endTime
		                    }
		                })
						.then(response => {
							let data = response.data;
							if (data.code == 200) {
								let dataInformation = response.data.data.results;
								this.tableTotal = response.data.data.total;// 数据长度
								this.tableData = dataInformation;
							} else {
								this.$message.error(data.msg);
							}
						})
						.catch(function (error) {
							console.log(error);
						});
		            },
		        	/* 列表页搜索 */
		            searchForm(selectForm) {
		                var pagesize = this.pagesize;
                        var pageno = 1;
						var start=this.selectForm.startTime;
						var end=this.selectForm.endTime;
						var count=this.checkDate(end,start);
						var start1=this.selectForm.startTime1;
						var end1=this.selectForm.endTime1;
						var count1=this.checkDate(end1,start1);
						if(count<0||count1<0){
							this.$message.error("开始时间不能大于结束时间")
						}else{
							axios({
								method: 'get',
								url: '/fxyj/acquier/getAllAcquier',
								params: {
									pageSize: pagesize,
									pageNo: pageno,
									fxyjDomainId: this.selectForm.fxyjDomainId,
									fxyjTitle: this.selectForm.fxyjTitle,
									fxyjLevel: this.selectForm.fxyjLevel,
									fxyjObjectName: this.selectForm.fxyjObjectName,
									startTime1: this.selectForm.startTime1,
									endTime1: this.selectForm.endTime1,
									startTime: this.selectForm.startTime,
									endTime: this.selectForm.endTime
								}
							})
									.then(response => {
								let data = response.data;
							if (data.code == 200) {
								let dataInformation = response.data.data.results;
								this.tableTotal = response.data.data.total;// 数据长度

								this.tableData = dataInformation;
							} else {
								this.$message.error(data.msg);
							}
						})
						.catch(function (error) {
								console.log(error);
							});
						}
		            },
		            /* 列表页重置 */
		            resetForm(formName) {
		                this.selectForm.fxyjDomainId = '';
		                this.selectForm.fxyjTitle = '';
		                this.selectForm.fxyjLevel = '';
		                this.selectForm.fxyjObjectName = '';
                        this.selectForm.startTime1 = '';
                        this.selectForm.endTime1 = '';
		                this.selectForm.startTime = '';
		                this.selectForm.endTime = '';
		                this.currentPage=1;
		                this.getData();
		            },
		        	//每页下拉显示数据
		            handleSizeChange(size) {
		                this.pagesize = size;
		                this.getData();
		            },
		            //点击第几页
		            handleCurrentChange(currentPage) {
		                this.currentPage = currentPage;
		                this.getData();
		            },
		            // 设置允许填写和不允许填写
		            checkDisabled(n){
		                if(n){
		                    this.formDisabled = true;
		                    this.replyformDisabled = true;
		                }else{
		                    this.formDisabled = false;
		                    this.replyformDisabled = false;
		                }
		            },
		            //查看
		            view(index,row){
		                this.showInformation(index,row);
		                this.dialogViewForm=true;
						this.viewOrEdit=false;
		                this.checkDisabled(true);
		            },
		            // 公共方法--查看
		            showInformation(index,row){
		                axios({
		                    method: 'post',
		                    url: '/fxyj/acquier/findById',
		                    params: {
		                        id: row.id
		                    }
		                })
						.then(response => {
							let data = response.data;
							if (data.code == 200) {
								let rowdata = response.data.data;
								this.clearForm(); // 重置
								this.riskwarningview = rowdata;
							} else {
								this.$message.error(data.msg);
							}
						})
						.catch(function (error) {
							console.log(error);
						});
		            },
					//认领页面
					claim(index,row){
						this.dialogViewForm=true;
						this.formDisabled=true;
						this.viewOrEdit=true;
						this.clearForm();
						row.operatePerson=this.userInfo.loginName;
						row.operateOrg=this.userInfo.orgName;
						row.disposeResult='0';
						this.riskwarningview=row
					},
					//认领提交
					submitForm(){
                        this.$refs.riskwarningview.validate(valid => {
                            if (valid) {
								this.$confirm('是否提交，提交后不能修改','提示', {
									confirmButtonText: '确定',
									cancelButtonText: '取消',
									type:'warning'
								}).then(()=>{
									axios({
										method: 'post',
										url: '/fxyj/acquier/updAcquire',
										data: this.riskwarningview
									})
											.then(response => {
												let data = response.data;
												if (data.code == 200) {
													this.$message({
														message: '认领成功',
														type: 'success'
													});
													this.clearForm(); // 重置
													this.dialogViewForm=false;
													this.getData();
												} else {
													this.$message.error(data.msg);
												}
											})
								})
							}else{
								console.log("必填项不能为空！");
								return false;
							}
						});
					},
                    clearForm() {
                       /*this.riskwarningview.operatePerson = '';
                        this.riskwarningview.operateOrg = '';*/
                        this.riskwarningview.disposeResult = '0';
                        this.riskwarningview.getTime = '';
                        this.riskwarningview.disposeExplain = '';
                    },
                    //导出
                    appovalEx(){
                        window.location.href="/fxyj/export/exportAcquire?fxyjDomainId="+this.selectForm.fxyjDomainId+"&fxyjTitle="
                            +this.selectForm.fxyjTitle+"&fxyjLevel="
                            +this.selectForm.fxyjLevel+"&fxyjObjectName="
                            +this.selectForm.fxyjObjectName+"&startTime1="
                            +this.selectForm.startTime1+"&endTime1="
                            +this.selectForm.endTime1+"&startTime="
                        	+this.selectForm.startTime+"&endTime="
                            +this.selectForm.endTime+"&pageNo=1";
                    },
					checkDate(str1, str2){
						if(str1!=null && str2!=null ){
							var reg = /[^\d]+/;
							var arr1 = str1.split(reg);
							var arr2 = str2.split(reg);
							var d1 = new Date(arr1[0],arr1[1],arr1[2]);
							var d2 = new Date(arr2[0],arr2[1],arr2[2]);
							return d1 - d2;
						}

					}
		        }
			})
		</script>
	</body>
</html>
